local jujian = fk.CreateSkill({
  name = "js__jujian",
})

jujian:addEffect(fk.EventPhaseStart, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(jujian.name) and target == player and player.phase == Player.Discard
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(3, self.name)
    local room = player.room
    room:addTableMark(player, "@@js__jujian")
  end,
})

jujian:addEffect("prohibit", {
  is_prohibited = function (self, from, to, card)
    return to:hasSkill(jujian.name) and card and from ~= to and card.name == "peach"
    and to:getMark("@@js__jujian") ~= 0
  end,
})

jujian:addEffect(fk.AfterCardUseDeclared, {
  anim_type = "control",
  can_trigger = function(self, event, target, player, data)
    return  player:hasSkill(jujian.name) and
        data.card:isCommonTrick() and #table.filter(data.tos, function(id)
            return p==player
        end) ~= 0 and player:getMark("@@js__jujian") ~= 0
  end,
  on_use = function(self, event, target, player, data)
    local players = table.filter(player.room.players, function(id)
            return p~=player
    end)
    data.unoffsetableList = table.simpleClone(players)
  end,
})

jujian:addEffect(fk.TurnStart, {
  anim_type = "offensive",
  mute = true,
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(jujian.name)
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    player.room:setPlayerMark(player, "@@js__jujian", 0)
  end,
})

Fk:loadTranslationTable {
["js__jujian"] = "拒谏",
[":js__jujian"] = "弃牌阶段开始时，你可以摸三张牌，然后直到你的下个回合开始，其他角色不能对你使用【桃】且不能使用【无解可击】抵消即将对你生效的锦囊牌。",
["$js__jujian1"] = "尔等眼中，只见到朕的昏庸吗？",
["$js__jujian2"] = "我作天子，不得自在邪？",
["@@js__jujian"] = "拒谏"
}
return jujian